package dhbw.Data;
/**
 * Klasse zum definieren der Adresse, der Benutzer.
 * 
 *
 */
public class E_Address {

	private String street;
	private String city;
	private String zipcode;
	private String email;
	private String phone;
	private String mobile;
	private String userid;
	
	public E_Address() {
		this.street = "";
		this.city = "";
		this.zipcode = "";
		this.email = "";
		this.phone = "";
		this.mobile = "";
		
		
	}
	
	public E_Address(String id, String street, String city, String zipcode, String email,
			String phone, String mobile) {
		super();
		this.street = street;
		this.city = city;
		this.zipcode = zipcode;
		this.email = email;
		this.phone = phone;
		this.mobile = mobile;
		this.userid = id;
	}
	public String getStreet() {
		return street;
	}
	public void setStreet(String street) {
		this.street = street;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getZipcode() {
		return zipcode;
	}
	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}
	
	/**
	 * Nimmt die Eingaben und Konvertiert diese zu Strings
	 */
	public String toString()
	{
		String s1 = "Adresse("+this.getUserid()+"):"
				+ " -Strasse:"+this.getStreet()
				+ " -Stadt:"+this.getCity()
				+ " -PLZ:"+this.getZipcode()
				+ " -Email:"+this.getEmail()
				+ " -Phone:"+this.getPhone()
				+ " -Mobile:"+this.getMobile();
		return s1;
	}
	
	/**
	 * Liest die Adresse zum speichern aus	
	 * @return String mit Komma separierten Adressdaten
	 */
	public String saveAdress(){
		String s = this.getStreet()
				+","+this.getCity()
				+","+this.getZipcode()
				+","+this.getEmail()
				+","+this.getPhone()
				+","+this.getMobile();
		return s;
	}
	
}
